package com.javaspeak.designpatterns.go4.creational.prototype;

import com.javaspeak.designpatterns.go4.creational.prototype.Shape;

/**
 * Triangle
 *
 * @author John Dickerson
 */
public class Triangle extends Shape {

    /**
     * Constructor pretending to do some expensive initialisation
     */
    public Triangle(){

        StringBuilder sb = new StringBuilder();
        sb.append( "   x   \n" );
        sb.append( "  x x  \n" );
        sb.append( " x   x \n" );
        sb.append( "xxxxxxx\n" );
        this.pixels = sb.toString();
    }
}
